package com.enjoy.mall.user.controller;


import com.enjoy.mall.entity.User;
import com.enjoy.mall.service.UserService;
import com.tuling.mall.common.R;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserController {

    @DubboReference
    private UserService userService;


    @RequestMapping("/findOrder/{userId}")
    public R findOrder(@PathVariable("userId") String userId) {
        User user = userService.findUser(userId);

        System.out.println(user);
        return R.success();
    }
}
